import tensorflow as tf

#在tensorflow中需要定义placeholder的type，一般float32形式
input1 = tf.placeholder(tf.float32)
input2 = tf.placeholder(tf.float32)

#multiply 是将input1和inpu2做乘法运算，并输出为output,matmul是矩阵乘法
output = tf.multiply(input1,input2)

with tf.Session() as sess:
    print(sess.run(output,feed_dict = {input1:[7.],input2:[2.]}))